Skip to content

add travel reimbursement form changes #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

enn-miray
Copy link

No description provided.

* This component accepts <code>application</code> via props, rather than via
* <code>useApplicationContext</code>, because it requires the application to already be loaded before being rendered.
*/
function travelReimbursmentForm({ application }: { application: Application }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function travelReimbursmentForm({ application }: { application: Application }) {
function TravelReimbursmentForm({ application }: { application: Application }) {

React component names must be named in PascalCase

})

async function onSubmit(values: z.infer<typeof travelReimbursmentFormSchema>): Promise<void> {
await updateApplication("personal", values)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be removed/replaced with something that creates/updates the travel reimbursement request - it's fine for that function to be a placeholder for now

</div>
</div>
<div className="mt-16 flex justify-center">
<FormSubmitButton type="submit">Save Progress</FormSubmitButton>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submit button should probably be more like 'submit travel reimbursement request'

}

function TravelReimbursmentFormSkeleton() {
return <FormSkeleton rows={3} className="mt-2" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of rows in the skeleton should ultimately match the number of fields in the form - the fields in the form will be changing though, so that's okay

return <TravelReimbursmentFormSkeleton />
}

return <TravelReimbursmentFormSkeleton application={application} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the application is loaded, you should return the actual form component, not just the skeleton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants